
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class IODemo3 {
    public static void main(String[] args) {
        char[] arr = new char[1024];
        try(Reader reader = new FileReader("D:/tmp.txt")) {
            while(true) {
                int n = reader.read(arr);
                if(n == -1) {
                    break;
                }
                for(int i = 0; i < n ; i ++) {
                    System.out.print(arr[i] + "");
                }

            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
